<template>
    <div class="enter">
        <div class="logo-box">
            <div class="logo-img">
                <img src="../../assets/images/baseImage/img_logo.png" />
            </div>
            <div class="logo-text">
                <img src="../../assets/images/baseImage/img_logo_text.png" />
            </div>
        </div>
        <div class="com-des">
            <div class="des-first">欢迎加入陇东设计汇平台</div>
            <div class="des-last">陇东设计汇是为家装从业者打造的，集设计、采购、数据看板等能力于一体的，可自主运营的聚合平台。</div>
        </div>
        <div class="content">您需要完成认证后方可在本平台发布相关作品或其他自媒体内容</div>
        <div class="enter-box">
            <div class="enter" v-for="v in list" :key="v.name">
                <div class="enter-img"><img :src="v.imgSrc" /></div>
                <div class="enter-title">{{ v.honour }}</div>
                <div class="enter-des">
                    <div>{{ v.desTop }}</div>
                    <div>{{ v.desSecond }}</div>
                </div>
                <div class="enter-btn"><el-button size="small" :disabled="isActive.indexOf(v.name) != -1"
                        type="primary" @click="goRouter(v.name)">立即认证</el-button>
                </div>
            </div>
        </div>
    </div>
</template>
<script setup>
import img1 from '../../assets/images/baseImage/img_designer.png'
import img2 from '../../assets/images/baseImage/img_business-building.png'
import img3 from '../../assets/images/baseImage/img_storage.png'
import useUserStore from '@/store/modules/user'
const router = useRouter();
const list = ref([
    { name: 'Designer', imgSrc: img1, honour: '设计师', desTop: '适合个人设计创业者', desSecond: '可上传作品和案例' },
    { name: 'DesignOrganization', imgSrc: img2, honour: '机构', desTop: '适合设计团队或高校', desSecond: '可管理设计师' },
    { name: 'Material', imgSrc: img3, honour: '材料商', desTop: '适合设计施工承包商', desSecond: '可发布材料商品' },
])
const isActive = useUserStore().rolesList
const goRouter = (name) => {
    switch (name) {
        case 'Designer':
            router.push('/designers/editDesigner/' + 'authentication')
            break
        case 'DesignOrganization':
            router.push('/designAgency/editDesignAgency/' + 'authentication')
            break
        case "Material":
            router.push('/materialCom/editMaterialCom/' + 'authentication')
            break;
        default:
            break;
    }
}
</script>
<style lang="scss" scoped>
.enter {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    margin-top: 30px;

    .logo-box {
        display: flex;
        align-items: center;
        justify-content: center;

        .logo-img {
            width: 60px;
            height: 60px;

            img {
                width: 100%;
                height: 100%;
            }
        }

        .logo-text {
            width: 120px;
            height: 38px;
            margin-left: 16px;

            img {
                width: 100%;
                height: 100%;
            }
        }
    }

    .com-des {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        font-family: NotoSansHans, NotoSansHans;
        font-weight: 400;
        font-size: 14px;
        color: #B0B0B0;
        line-height: 21px;
        text-align: center;
        font-style: normal;
        margin-top: 30px;
    }

    .content {
        font-family: NotoSansHans, NotoSansHans;
        font-weight: 400;
        font-size: 18px;
        color: #000000;
        line-height: 27px;
        text-align: center;
        font-style: normal;
        margin-top: 66px;
    }

    .enter-box {
        display: flex;
        align-items: center;
        justify-content: center;

        .enter {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            width: 244px;
            height: 316px;
            background: #FFFFFF;
            box-shadow: 0px 2px 7px 0px #EAEBF1;
            border-radius: 8px;
            margin: 38px 10px;

            .enter-title {
                font-family: PingFangSC, PingFang SC;
                font-weight: 600;
                font-size: 22px;
                color: #000000;
                line-height: 30px;
                text-align: left;
                font-style: normal;
                margin: 20px 0 10px;
            }

            .enter-des {
                font-family: NotoSansHans, NotoSansHans;
                font-weight: 400;
                font-size: 13px;
                color: #B0B0B0;
                line-height: 20px;
                text-align: center;
                font-style: normal;
            }

            .enter-btn {
                margin-top: 36px;
            }
        }
    }

}

::v-deep(.el-button.is-disabled) {
    background-color: #cccccc;
}
</style>